package com.example.demo.entity;

import com.example.demo.BaseEntity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户
 *
 * @author 俊何
 * @since 2021-08-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "User对象", description = "用户")
public class User extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "用户类型 1普通用户，2马甲 type")
    private Integer type;

    @ApiModelProperty(value = "头像 avatar")
    private String avatar;

    @ApiModelProperty(value = "3级地址code")
    private String areaCode;

    @ApiModelProperty(value = "性别 sex 性别:0:未知1:男2:女")
    private Boolean sex;

    @ApiModelProperty(value = "目标id（悠洗用户id)")
    private Integer targetId;

    @ApiModelProperty(value = "操作者id")
    private Integer operatorId;

    @ApiModelProperty(value = "是否删除?0:未删除1:已删除")
    private Integer isDel;

    public User(String username, Integer type, String avatar, String areaCode, Boolean sex, Integer targetId,
        Integer operatorId, Integer isDel) {
        this.username = username;
        this.type = type;
        this.avatar = avatar;
        this.areaCode = areaCode;
        this.sex = sex;
        this.targetId = targetId;
        this.operatorId = operatorId;
        this.isDel = isDel;
    }

    public User(String username) {
        this.username = username;
    }
}
